package com.thread.learn.thread2;

import java.util.Timer;
import java.util.TimerTask;
import java.util.concurrent.ExecutionException;

public class Demo5 {
	
	public static void main(String[] args) throws InterruptedException, ExecutionException {
		Timer tiemr =new Timer();
		
		tiemr.schedule(new TimerTask() {
			
			@Override
			public void run() {
				System.out.println("执行了");				
			}
		},0,1000);
		
	}
	
	
}
